package day7;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileRead {
    public static void main(String[] args) {
        FileInputStream fin=null;
        try {
             fin=new FileInputStream("D:\\Documents\\桌面\\rent-freely-master\\free-room\\README.txt");
            int ch=0;
            while ((ch=fin.read())!=-1){
                System.out.print((char)ch);
            }
//            ch=fin.read();//-1
//            System.out.println(ch);
//            ch=fin.read();
//            System.out.println(ch);
//            ch=fin.read();
//            System.out.println(ch);

        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if(fin!=null) {
                try {
                    fin.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
